package pATT.logger;

import java.text.SimpleDateFormat;
import java.util.Date;

import pATT.core.visual.UserProfilingUI;

public class Logger {
	
//	public static Logger eINSTANCE = new Logger();
	
	
	public static void log(String message){
		UserProfilingUI.eINSTANCE.setMessage('\n'+getTimestamp()+"  "+message);
	}
		
	public static void logInitial(){
		String date = (new SimpleDateFormat("EEEE, d MMMM yyyy")).format(new Date());
		
		String output=getTimestamp()+"  "+Message.INITIAL_MESSAGE+'\n';
		output+=getTimestamp()+"  "+Message.INITIAL_MESSAGE2+'\n';
		output+= getTimestamp()+"  "+Message.INITIAL_MESSAGE3+date;
		UserProfilingUI.eINSTANCE.clearLog();
		UserProfilingUI.eINSTANCE.setMessage(output);
	}
	
	private static String getTimestamp() {
		
		return (new SimpleDateFormat("HH:mm:ss:")).format(new Date());
	}
	
}
